﻿'Namespace MMUtil
Module modError

    Public strLastErrMsg As String
    Public strLastErrTrace As String

    Public Function GetLastErrorMsg() As String
        GetLastErrorMsg = strLastErrMsg
    End Function

    Public Function GetLastTrace() As String
        GetLastTrace = strLastErrTrace
    End Function

    Public Sub ClearError()
        strLastErrMsg = ""
        strLastErrTrace = ""
    End Sub

    Public Sub SetErrorInfo(ByRef ex As Exception)
        strLastErrMsg = ex.Message
        strLastErrTrace = ex.StackTrace
    End Sub

End Module
'End Namespace

